package com.foreknow.demo08;

public class Computer {
    private String comName;
    private int comScore;

    public String getComName() {
        return comName;
    }

    public void setComName(String comName) {
        this.comName = comName;
    }

    public int getComScore() {
        return comScore;
    }

    public void setComScore(int comScore) {
        this.comScore = comScore;
    }

    public int comOpera(){
        int choice = (int)(Math.random()*10)%3+1;
        switch (choice){
            case 1:
                System.out.println(this.comName + " 出拳： 剪刀");
                break;
            case 2:
                System.out.println(this.comName + " 出拳： 石头");
                break;
            case 3:
                System.out.println(this.comName + "出拳： 布");
                break;
        }
        return choice;
    }

}
